package com.dong.ui.util;

import javax.swing.*;
import java.awt.*;

/**
 * @description: 弹出消息工具类，提供一个修改的入口
 * @author: 陈瑞东
 * @create: 2021-08-26 08:53
 */
public class MessageUtils {

    /**
     * 弹出消息
     * @param parentComponent
     * @param message
     * @param title
     * @param messageType
     */
    public static void showMessageDialog(Component parentComponent, Object message, String title, int messageType) {
        JOptionPane.showMessageDialog(parentComponent, message, title, messageType);
    }

    /**
     * 弹出消息
     * @param parentComponent
     * @param message
     * @param title
     * @param optionType
     */
    public static int showConfirmDialog(Component parentComponent, Object message, String title, int optionType) {
        return JOptionPane.showConfirmDialog(parentComponent, message, title, optionType);
    }
}
